package com.tanhua.model.vo;

import com.tanhua.model.domain.UserInfo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * @Desciption:test
 * @Create by:金木yan
 * @Date: 2021/12/10 20:07
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
//测试灵魂报告，与你相似用户信息
public class SimilarYou implements Serializable {
    private Integer id; //用户编号
    private String avatar; //头像

    //构建vo
    public static SimilarYou init(UserInfo userInfo) {
        SimilarYou similarYou = new SimilarYou();
        similarYou.setId(Math.toIntExact(userInfo.getId()));
        similarYou.setAvatar(userInfo.getAvatar());
        return similarYou;
    }
}
